<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./baselogin.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="title">
        Tela de entra da so Site
    </ui:define>
    
    <ui:define name="content">
        <h:outputStylesheet library="css" name="login.css"/>
        <h:form id="formLogin">
            <h:messages styleClass="error" id="display"/>
                <f:validateBean>
                    <div class="logintable" id="login">
                        <table>
                            <tr>
                                <td>Login:</td>
                                <td><h:inputText value="#{loginFace.login}"
                                                 required="true" requiredMessage="É necessário informar um email para Logar no Sistema!">
                                        <f:ajax render="display" event="blur" />
                                    </h:inputText></td>
                            </tr>
                                <td>Senha:</td>
                                <td><h:inputSecret value="#{loginFace.password}" required="true"
                                                   requiredMessage="Informar uma senha válida!">
                                        <f:ajax render="display" event="blur"/>
                                    </h:inputSecret></td>
                                <td><h:commandButton id="btnLogin" action="#{loginFace.doLogin}"
                                                     value="Entra" >
                                    </h:commandButton></td>
                        </table>
                        <a href="./inicio/">inicio</a>
                    </div>
                </f:validateBean>
        </h:form>
    </ui:define>

</ui:composition>
